package com.uzai.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.mini.minicomponentauth.MiniComponentAuthQuery;
import com.uzai.console.entity.MiniComponentAuth;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
public interface MiniComponentAuthMapper {
    MiniComponentAuth selectByAuthorizerAppid(@Param("authorizerAppid") String authorizerAppid);

    int insert(MiniComponentAuth record);

    int updateById(MiniComponentAuth record);

    int deleteByAuthorizerAppid(@Param("authorizerAppid") String authorizerAppid);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    ArrayList<MiniComponentAuth> findByList(Page<MiniComponentAuth> page, @Param("query") MiniComponentAuthQuery query);

    /**
     * 查询所有
     * @param query
     * @return
     */
    ArrayList<MiniComponentAuth> findByList(@Param("query") MiniComponentAuthQuery query);
}